<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/include/taglibs.jsp" %>
<html>
<head>
    <%@include file="/include/header.html" %>
    <script type="text/javascript"
            src="${ctx}/appjs/tenant/role/role.js"></script>
    <link rel="stylesheet" href="${ctx}/statics/css/update.css">
    <link rel="stylesheet" href="${ctx}/statics/css/common.css">
    <link rel="stylesheet" href="${ctx}/libjs/plugins/bootstrap-table-pagejump/bootstrap-table-pagejump.css">
    <script src="${ctx}/libjs/plugins/bootstrap-table-pagejump/bootstrap-table-pagejump.js"></script>
    <%--<link rel="stylesheet" href="${ctx}/libjs/plugins/laydate/skins/laydate.css">--%>
    <link rel="stylesheet" href="${ctx}/libjs/plugins/laydate/laydate.css">
    <script src="${ctx}/libjs/plugins/laydate/laydate.js"></script>
    <link rel="stylesheet" href="${ctx}/libjs/plugins/bootStrap-table-fixed-column/bootstrap-table-fixed-columns.css">
    <script src="${ctx}/libjs/plugins/bootStrap-table-fixed-column/bootstrap-table-fixed-columns.js"></script>

    <script src="${ctx}/libjs/plugins/xm-select/xm-select.js"></script>
    <style>
        .ibox-body #exampleModal input, .ibox-body #exampleModal select {
            width: 100% !important;
            height: 38px !important;
        }

        #exampleModal .btn, .btn-sm {
            margin-bottom: 0;
        }

        #exampleModal .form-group {
            padding-top: 0;
            margin-bottom: 5px;
        }

        .bootstrap-table .fixed-table-container .table thead th .th-inner {
            text-align: center !important;
        }
    </style>

</head>

<script type="text/javascript">
    $('#topLink', window.parent.document).html(function(i,origText){
        return'<ol class="breadcrumb">' +
            '<li class="breadcrumb-item">' +
            '<a href="">主页</a>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<a>平台设置</a>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<strong>平台角色设置</strong>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<a href="javascript:window.history.back()"><i class="fa fa-times"></i> 返回</a>' +
            '</li>' +
            '</ol>';
        });


    var has_add = '';
    var has_edit = '';
    var has_delete = '';
    var MemberManager_enterpriseMemberApply_look = false;
</script>

<body class="gray-bg">
	<div class="wrapper wrapper-content ">
		<div class="col-sm-12">
			<div class="ibox">
				<div class="ibox-body">
                    <div class="row">

                        <div class="pull-left search ">
                            <input id="roleName" name="roleName" type="text" class="form-control"
                                   placeholder="角色名称">
                        </div>
                        <div class="pull-left search ">
                            <button class="btn btn-success" onclick="tenantRole.reLoad()">查询</button>
                        </div>
                        <div class="pull-left" style="margin-left: 4px">
                            <button type="button" class="btn pull-left  btn-primary" onclick="tenantRole.addTenantRole()">
                                增加
                            </button>
                        </div>
                        <div class="pull-left search ">
                            <button class="btn btn-success input-distance exportBtn" onclick="tenantRole.exportList()">导出</button>
                        </div>
                    </div>

                    <table id="exampleTable" data-mobile-responsive="true">
                    </table>
				</div>
			</div>
		</div>
	</div>


    <%--  模态框  --%>
    <div class="modal fade" id="exampleModal" tabindex="-1" role="dialog"
         aria-labelledby="exampleModalLabel">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h4 class="modal-title">分配权限</h4>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                            aria-hidden="true"></span></button>
                    <h4 id="exampleModalLabel" data-dismiss="modal" aria-label="Close">
                        关闭</h4>
                </div>
                <div class="modal-body">
                    <form id="contentForm" class="layui-form">
                        <div class="form-group row">
                            <label class="col-sm-4 col-form-label text-right">角色名称:</label>
                            <div class="col-sm-8">
                                <input id="roleNameModel" class="form-control" type="text" readonly></input>
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-4 col-form-label text-right">权限范围:</label>
                            <div class="col-sm-8">
                                <div id="dataAuthList" class="xm-select-demo"></div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" id="cancelBtn" data-dismiss="modal">取消</button>
                    <button type="button" class="btn btn-success" id="submitForm">确认</button>
                </div>
            </div>
        </div>
    </div>
<style>
   .modal-title{
       font-size: 0.15rem !important;
       width: 450px;
   }
    #exampleModal .form-group{
        padding-top: 20px;
    }
    .modal-body{
        height: 200px;
    }
</style>
<script type="text/javascript">

    tenantRole.init();
</script>
</body>
</html>
